/**
 * Captain
 * © 2017 Captain copyright，All rights reserved.
 * http://www.sccaptain.com.cn
 * 
 * JAVA : 8
 * 文  件  名: CriterionExpression.java
 * 创  建  人: liutao (liu.tao@sccaptain.com.cn)
 * 创建时间: 2017年8月2日 下午2:13:50
 * 版         本: 1.0.0
 * 备         注:
 * 修订历史:
 */
package com.material.c2c.core.criteria;

/**
 * 简单条件表达式。
 * 
 * @since 1.0
 * @version 1.0
 * @author liutao (liu.tao@sccaptain.com.cn)
 */
public class CriterionExpression implements Criterion {

  private String property; // 属性名
  private String propertyType; // 属性类型。
  private Object value; // 对应值
  private Operator operator; // 计算符
  private MatchMode mode; // 模糊匹配类型
  private String pattern; // 日期格式

  public CriterionExpression() {
  }

  public CriterionExpression(String property, Operator operator) {
    this.property = property;
    this.operator = operator;
  }

  public CriterionExpression(String property, Object value, Operator operator) {
    this(property,operator);
    this.value = value;
    
  }

  public CriterionExpression(String property, Object value, Operator operator, MatchMode mode) {
    this(property,value,operator);
    this.mode = mode;
  }
  
  public CriterionExpression(String property, Object value, Operator operator, String propertyType) {
    this(property,value,operator);
    this.propertyType = propertyType;
  }
  
  public CriterionExpression(String property, Object value, Operator operator, String propertyType,String pattern) {
    this(property,value,operator);
    this.propertyType = propertyType;
    this.pattern = pattern;
  }
  

  public String getProperty() {
    return property;
  }

  public void setProperty(String property) {
    this.property = property;
  }

  public String getPropertyType() {
    return propertyType;
  }

  public void setPropertyType(String propertyType) {
    this.propertyType = propertyType;
  }

  public Object getValue() {
    return value;
  }

  public void setValue(Object value) {
    this.value = value;
  }

  public Operator getOperator() {
    return operator;
  }

  public void setOperator(Operator operator) {
    this.operator = operator;
  }

  public MatchMode getMode() {
    return mode;
  }

  public void setMode(MatchMode mode) {
    this.mode = mode;
  }

  public String getPattern() {
    return pattern;
  }

  public void setPattern(String pattern) {
    this.pattern = pattern;
  }

}
